<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
		<meta name="author" content="金西振" />
		<title></title>
		<style></style>
	</head>
	<body>
		<script>
			// 浏览器信息对象：浏览器的名字、版本、系统（平台）等信息
			console.log(navigator);

			console.log(navigator.userAgent);

			// 判断是否是移动端设置
			console.log(navigator.userAgent.includes('Mobile'));
			console.log(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|OperaMini/i.test(navigator.userAgent));

      
			// console.log(navigator.onLine);
			// window.addEventListener('offline', function (e) {
			// 	console.log('offline');
			// });
			// window.addEventListener('online', function (e) {
			// 	console.log('online');
			// });
		</script>
	</body>
</html>
